<!DOCTYPE html>
<!--[if IE 8]> <html lang="zh-CN" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="zh-CN" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="zh-CN" class="no-js">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<meta charset="utf-8"/>
<?=get_title()?>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1" name="viewport"/>
<meta content="Formax OA System" name="description"/>
<meta content="Formax Group" name="author"/>
<!-- base href="<?=static_url(null, false)?>" / -->
<?=$this->assets->outputCss()?>
<link rel="shortcut icon" href="<?=static_url('favicon.ico')?>"/>
</head>
<!-- END HEAD -->

<!-- BEGIN BODY -->
<body class="<?=get_var('bodyClass', 'page-header-fixed')?>
             <?=on(cookie_get('sidebar_closed', true), 'page-sidebar-closed')?>
             <?=on(cookie_get('sidebar_fixed'), 'page-sidebar-fixed')?>">

<? if (! (isset($disableHeader) && $disableHeader)): ?>
<!-- BEGIN HEADER -->
<? partial_view('parts/header') ?>
<!-- END HEADER -->
<? endif; ?>

<? if (isset($disableContainer) && $disableContainer): ?>
    <?=get_content()?>
<? else: ?>
<!-- BEGIN CONTAINER -->
<div class="page-container">

    <!-- BEGIN SIDEBAR -->
    <? partial_view('parts/sidebar') ?>
    <!-- END SIDEBAR -->

    <!-- BEGIN CONTENT -->
    <div class="page-content-wrapper">
        <div class="page-content">

            <!-- 加载各种隐藏的对话框/层 -->
            <? partial_view('parts/modals') ?>

            <!-- 风格定制面板 -->
            <? partial_view('parts/theme-panel') ?>

            <!-- 页面内容 -->
            <?=get_content()?>

            <? if (! PRODUCTION || $this->request->getQuery('debug') === 'yes'): ?>
                <? partial_view('parts/debug') ?>
            <? endif; ?>

            <!-- END DASHBOARD STATS -->
            <div class="clearfix"></div>
        </div>
    </div>
    <!-- END CONTENT -->
</div>
<!-- END CONTAINER -->
<? endif; ?>

<? if (! (isset($disableFooter) && $disableFooter)): ?>
<!-- BEGIN FOOTER -->
<? partial_view('parts/footer') ?>
<!-- END FOOTER -->
<? endif; ?>

<!-- BEGIN JAVASCRIPTS -->
<!--[if lt IE 9]>
<script src="<?=js_url('plugins/respond.min.js')?>"></script>
<script src="<?=js_url('plugins/excanvas.min.js')?>"></script>
<![endif]-->
<script type="text/javascript">
window.FORMAX = window.FORMAX || {};
FORMAX.debug     = <?=PRODUCTION?'true':'false'?>;
FORMAX.lang      = '<?=$lang?>';
FORMAX.baseUrl   = '<?=url()?>';
FORMAX.staticUrl = '<?=static_url(null, false)?>';
FORMAX.translate = function(text, values) {
    var data = <?=json_it($this->i18n->toArray(), false, true)?>;
    if (typeof data[text] !== 'undefined') { text = data[text]; }
    if (typeof values === 'object') { for (key in values) { text = text.replace(key, values[key]); } }
    return text;
};
window.__ = window.__ || FORMAX.translate;
</script>
<?=require_js($requireJS)?>
<!-- END JAVASCRIPTS -->

</body>
<!-- END BODY -->

</html>
